import request from '@/api/utils/requery'

//注册界面

//提交邮箱
export const emailSubmit = email => request({
    method: 'post',
    url:`user/selectByEmail?email=${email}`
})

//用邮箱注册账号
export const emailRegister = (email, yzm, password) => {
    return request({
        method: 'post',
        url:`user/registByEmail?email=${email}&code=${yzm}&password=${password}`
    })
}

//用手机号注册账号
export const phoneRegister = (phone, yzm, password) => {
    return request({
        method: 'post',
        url:`user/registByTelephone?telephone=${phone}&code=${yzm}&password=${password}`
    })
}

//获取邮箱验证码
export const emailYzm = (email) => request({
    method: 'post',
    url:`user/sendCodeByEmail?email=${email}`
})

//获取手机验证码
export const phoneYzm = (phone) => request({
    method: 'post',
    url:`user/sendCodeByTelephone?telephone=${phone}`
})

